We are migrating the bug tracker to github Issues. This is now the preferred way to report NASM bugs.

Self-registration is disabled due to spam issue (mail gorcunov@gmail.com or hpa@zytor.com to create an account)

Bug 3392927 - Trailing colon in name parameter for section directive treated as part of name (silently)
Summary: Trailing colon in name parameter for section directive treated as part of nam...
Status: OPEN
Alias: None
Product: NASM
Classification: Unclassified
Component: Assembler (show other bugs)
Version: 2.16.xx
Hardware: All All
: Medium annoyance
Assignee: nobody
URL:
Depends on:
Blocks:
 
Reported: 2024-12-25 06:34 PST by E. C. Masloch
Modified: 2024-12-25 06:34 PST (History)
4 users (show)

Obtained from: Built from git using configure
Generated by: Human
Bug category: Unexpected or confusing behavior
Observed for: Invalid input
Regression: ---
Regression since:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description E. C. Masloch 2024-12-25 06:34:41 PST
I just replied to a stackoverflow question that was based on using "section .text:" rather than the desired form without a colon: https://stackoverflow.com/questions/79307756/calling-the-worlds-simplest-nasm-function-from-c-segfault

This problem has cropped up repeatedly. In both "-f bin", "-f obj", and "-f elf" it doesn't lead to a warning or error. But it creates a section with the colon interpreted as a part of the name, which users usually do not intend.

I suggest adding a warning for this.